<script type="text/javascript">
var GB_ANIMATION = true;

$(document).ready(function() {

   mouseenter = function(){
        $(this).animate({  
            border: "1px solid #FFAF6F"
          }); 
        $(".entry-titolo a",this).removeClass('ColorTitleNews');
        $(".entry-titolo a",this).addClass('ColorTitleNewsSelected');
        $(".entry-news div",this).removeClass('GreyContentNews');
        $(".entry-news div",this).addClass('GreyContentNewsSelected');
   };

   mouseleave = function(){
       $(this).animate({
           border: "1px groove #BFBFBF"
         });
        $(".entry-titolo a",this).removeClass('ColorTitleNewsSelected');
        $(".entry-titolo a",this).addClass('ColorTitleNews');
        $(".entry-news div",this).removeClass('GreyContentNewsSelected');
        $(".entry-news div",this).addClass('GreyContentNews'); 
   };
	
    //gestisce il passaggio del mouse su ogni news
	$(".ulNewsList:not(.isNotReadNews)").bind("mouseenter",mouseenter).bind("mouseleave",mouseleave);

	$("a.greybox").click(function(){
        var t = this.title || $(this).text() || this.href;
        GB_show(t,this.href,540,800);
        return false;
      });

	boxDelNewsMessages = {
        msg : "<?= $this->translate('msgDelNews')?>",
        boxTitle : "<?= $this->translate('titleDelNews')?>",
        msgStatus: "<?= $this->translate('statusDel')?>"
    };

});

</script>

<?foreach ($this->news as $news):?>
        <ul id="News-<?=$news->oid?>" class="ulNewsList <?if($news->isRead == 0):?>isNotReadNews<?endif?>">
            <li class="liNews">
            <!-- 
                <div class="entry-rating">
                    <input name="star1" type="radio" class="star"/>
                    <input name="star1" type="radio" class="star"/>
                    <input name="star1" type="radio" class="star"/>
                    <input name="star1" type="radio" class="star"/>
                    <input name="star1" type="radio" class="star"/>
                </div>
             -->    
                <h3 class="entry-titolo"><a id="Read-<?=$news->oid?>" class="ColorTitleNews" onclick="javascript:setIsRead('<?=$news->oid?>','/news/setisread');" target="_blank" href="<?=$news->url?>"><?= $news->title?></a></h3>
                <h5 class="entry-data"><?= $news->pubDate?></h5>
                <div><div class="entry-news"><div class="GreyContentNews"><?= $news->description?></div></div></div>
                <!--<p class="entry-news"><?//= $news->body?></p>-->
            </li>
            <li>
                <div class="feedbar">
                <?if ($this->displayLinks == true):?>
                    <ul class="ulboxbar">
                        <li id="SetIsRead-<?=$news->oid?>" class="liItemboxbar separatorItemBar" <?if($news->isRead == 0): ?> style="display: none;" <?endif?>>
                                <img id="imgIsRead-<?=$news->oid?>" class="imgItemboxbar separatorImageBar" alt="Is Read" src="../img/boxbar/isRead.png" />
                                <a id="aIsRead-<?=$news->oid?>" 
                                   class="aItemboxbar" 
                                   href="javascript:setIsNotRead('<?=$news->oid?>','/news/setisread');">
                                   <?= $this->translate('isRead')?>
                                </a>
                        </li>
                        <li id="isImportant-<?=$news->oid?>" 
                            <?if ($news->isImportant == 0): ?> style="display: none;"<?endif?> 
                            class="liItemboxbar separatorItemBar">
                            <img class="imgItemboxbar separatorImageBar"  alt="Is Important" src="../img/boxbar/isImportant.png" />
                            <a class="aItemboxbar" 
                               href="javascript:setIsNotImportant('<?=$news->oid?>','/news/setisimportant');">
                               <?= $this->translate('isNotImportant')?>
                            </a>
                        </li>
                        <li id="isNotImportant-<?=$news->oid?>" 
                            <?if ($news->isImportant == 1): ?> style="display: none;"<?endif?>
                            class="liItemboxbar separatorItemBar">
                            <img class="imgItemboxbar separatorImageBar"  alt="Is Important" src="../img/boxbar/isImportantGray.png" />
                            <a class="aItemboxbar" 
                               href="javascript:setIsImportant('<?=$news->oid?>','/news/setisimportant');">
                               <?= $this->translate('isImportant')?>
                            </a>
                        </li>
                        <li class="liItemboxbar separatorItemBar">
                            <img class="imgItemboxbar separatorImageBar" alt="Delete" src="../img/boxbar/cancelgrey.png" />
                                <a id="aDelete-<?=$news->oid?>" 
                                   class="aItemboxbar" 
                                   href="javascript:deleteUserElement('<?=$news->oid?>','/news/deleteusernews',$('#News-<?=$news->oid?>'),boxDelNewsMessages);">
                                   <?= $this->translate('delete')?>
                                </a>
                        </li>
                    </ul>
                 <?endif;?>
                    <ul class="signal">
                        <li id="SetIsNotRead-<?=$news->oid?>" class="liItemboxbar separatorItemBar">
                            <img id="imgIsRead-<?=$news->oid?>" class="imgItemboxbar separatorImageBar" alt="Is Read" src="../img/boxbar/isReadGray.png" />
                                <a id="read-<?=$news->oid?>" 
                                   href="<?=$news->url?>" 
                                   class="greybox aItemboxbar"
                                   onclick="javascript:setIsRead('<?=$news->oid?>','/news/setisread');">
                                   <?= $this->translate('readhear')?>
                                </a>
                        </li>
                    </ul>
                </div>
             </li>
         </ul>
    <?endforeach?>
